#include "ray.h"

namespace t2c2 {

Ray::Ray(const Vector3D& _origin,const Vector3D& _direction = Vector3D(0.0,0.0,0.0)) : origin(_origin), direction(_direction)
{ }

Ray::Ray(void) : origin(Vector3D(0.0,0.0,0.0)), direction(Vector3D(0.0,0.0,0.0))
{ }

Ray::Ray(const Ray& _ray) {
	origin = _ray.origin;
	direction = _ray.direction;
}

Ray::~Ray(void) { }

void Ray::set_origin(const Vector3D& _origin) { origin = _origin; }

void Ray::set_direction(const Vector3D& _direction) { direction = _direction; }

Vector3D Ray::get_origin(void) const { return origin; }

Vector3D Ray::get_direction(void) const { return direction; }

Ray& Ray::operator=(const Ray& _ray) {
	if(this != &_ray) {
		origin = _ray.origin;
		direction = _ray.direction;
	}
	return *this;
}

}
